//
//  TKIMStringHelper.h
//  TKIM
//
//  Created by liupm on 15/7/31.
//  Copyright (c) 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface TKIMStringHelper : NSObject

/**
 *  @Author lpm, 15-07-30 12:07:10
 *
 *  @brief  替换字符
 *
 *  @param string
 */
+(NSDictionary *)replaceString:(NSString *)content  from:(NSString *)regex to:(NSString *)to;

/**
 *  @Author lpm, 15-10-28 13:10:21
 *
 *  @brief  获得uuid
 *
 *  @return
 */
+ (NSString *)generateUUID;


/**
 *  @Author lpm, 15-10-28 13:10:44
 *
 *  @brief  是否为空
 *
 *  @param str
 *
 *  @return
 */
+(BOOL)isEmpty:(NSString *)str;


/**
 *  @Author lpm, 15-11-04 16:11:44
 *
 *  @brief  生成消息ID
 *
 *  @return
 */
+(NSString *)generateMsgId;



/**
 *  @Author lpm, 15-11-09 17:11:47
 *
 *  @brief  包含大写
 *
 *  @param string
 *
 *  @return
 */
+(BOOL)containsUpper:(NSString *)string;


/**
 *  @Author lpm, 15-11-17 15:11:12
 *
 *  @brief  获得文字size
 *
 *  @param font
 *  @param size
 *  @param lineBreakMode
 *  @param text          
 *
 *  @return
 */
+ (CGSize)sizeForFont:(UIFont *)font size:(CGSize)size mode:(NSLineBreakMode)lineBreakMode text:(id)text;


/**
 *  @Author lpm, 15-11-19 18:11:38
 *
 *  @brief  中文转拼音
 *
 *  @param hanziText
 *
 *  @return
 */
+(NSString *)parseCnToEn:(NSString *)hanziText;



/**
 *  @Author lpm, 16-05-24 13:05:13
 *
 *  @brief  是否是中文
 *
 *  @param str
 *
 *  @return
 */
+(BOOL)IsChinese:(NSString *)str;


/**
 *  @Author lpm, 15-11-04 16:11:58
 *
 *  @brief  生成做任意长度的随机字符
 *
 *  @param length
 *  @param randomAlphabet
 *
 *  @return
 */
+(NSString *)generateRandomStr:(NSInteger )length randomAlphabet:(NSString *)randomAlphabet;


+(NSString *)toHex:(long long int)tmpid;
@end
